package com.woniuxy.hrm.producer;

import com.woniuxy.hrm.util.RabbitmqConst;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class AddProducer {
    @Autowired
    RabbitTemplate rabbitTemplate;
    public void send(String routingKey, String message){
        rabbitTemplate.convertAndSend(RabbitmqConst.TOPIC_EXCHANGE,routingKey,message);

    }
}
